\(\int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\) [365]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-1)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 362 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {b B \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b B \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \]

[Out]

1/2*b*B*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)-2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2)^(1/2))^(1/2))/d*2^(1/2
)/(a-(a^2+b^2)^(1/2))^(1/2)-1/2*b*B*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)+2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2
+b^2)^(1/2))^(1/2))/d*2^(1/2)/(a-(a^2+b^2)^(1/2))^(1/2)+1/4*b*B*ln(a+(a^2+b^2)^(1/2)-2^(1/2)*(a+(a^2+b^2)^(1/2
))^(1/2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)-1/4*b*B*ln(a+(a^2+b^2)^(1/2)
+2^(1/2)*(a+(a^2+b^2)^(1/2))^(1/2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 362, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {21, 3566, 714, 1143, 648, 632, 212, 642} \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {b B \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}-\frac {b B \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}+\frac {b B \log \left (-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}}-\frac {b B \log \left (\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}} \]

[In]

Int[(a*B + b*B*Tan[c + d*x])/Sqrt[a + b*Tan[c + d*x]],x]

[Out]

(b*B*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] - Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/Sqrt[a - Sqrt[a^2 + b^2]]])/(Sqrt[
2]*Sqrt[a - Sqrt[a^2 + b^2]]*d) - (b*B*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] + Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/
Sqrt[a - Sqrt[a^2 + b^2]]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]]*d) + (b*B*Log[a + Sqrt[a^2 + b^2] + b*Tan[c + d
*x] - Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2*Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*d) - (
b*B*Log[a + Sqrt[a^2 + b^2] + b*Tan[c + d*x] + Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2
*Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*d)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 714

Int[Sqrt[(d_) + (e_.)*(x_)]/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2 + a*e^2 - 2*c*d
*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]

Rule 1143

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/
c, 2]}, Dist[1/(2*c*r), Int[x^(m - 1)/(q - r*x + x^2), x], x] - Dist[1/(2*c*r), Int[x^(m - 1)/(q + r*x + x^2),
 x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 1] && LtQ[m, 3] && NegQ[b^2 - 4*a*c]

Rule 3566

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[(a + x)^n/(b^2 + x^2), x], x
, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = B \int \sqrt {a+b \tan (c+d x)} \, dx \\ & = \frac {(b B) \text {Subst}\left (\int \frac {\sqrt {a+x}}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{d} \\ & = \frac {(2 b B) \text {Subst}\left (\int \frac {x^2}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {(b B) \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {(b B) \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {(b B) \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {(b B) \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {(b B) \text {Subst}\left (\int \frac {-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {(b B) \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {(b B) \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d}-\frac {(b B) \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {b B \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b B \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b B \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.24 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=-\frac {i B \left (\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )-\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )\right )}{d} \]

[In]

Integrate[(a*B + b*B*Tan[c + d*x])/Sqrt[a + b*Tan[c + d*x]],x]

[Out]

((-I)*B*(Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]] - Sqrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[
c + d*x]]/Sqrt[a + I*b]]))/d

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(661\) vs. \(2(291)=582\).

Time = 0.12 (sec) , antiderivative size = 662, normalized size of antiderivative = 1.83

method result size
derivativedivides \(-\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) B \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{4 d b}+\frac {B \left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) B \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{4 d b}-\frac {B \,a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) B \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{4 d b}-\frac {B \left (a^{2}+b^{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) B \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{4 d b}+\frac {B \,a^{2} \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) \(662\)
default \(-\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) B \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{4 d b}+\frac {B \left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) B \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{4 d b}-\frac {B \,a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) B \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{4 d b}-\frac {B \left (a^{2}+b^{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) B \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{4 d b}+\frac {B \,a^{2} \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) \(662\)
parts \(\text {Expression too large to display}\) \(1894\)

[In]

int((B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/4/d/b*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*B*(a^2+b^2)^(
1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+1/d*B/b*(a^2+b^2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^
(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/4/d/b*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))
^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*B*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a-1/d*B/b*a^2/(2*(a^2+b^
2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1
/2))+1/4/d/b*ln((a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)-b*tan(d*x+c)-a-(a^2+b^2)^(1/2))*B*(a^2+b^
2)^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)-1/d*B/b*(a^2+b^2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan(((2*(a^2+b^2)^(1
/2)+2*a)^(1/2)-2*(a+b*tan(d*x+c))^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/4/d/b*ln((a+b*tan(d*x+c))^(1/2)*(2*(
a^2+b^2)^(1/2)+2*a)^(1/2)-b*tan(d*x+c)-a-(a^2+b^2)^(1/2))*B*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a+1/d*B/b*a^2/(2*(a^
2+b^2)^(1/2)-2*a)^(1/2)*arctan(((2*(a^2+b^2)^(1/2)+2*a)^(1/2)-2*(a+b*tan(d*x+c))^(1/2))/(2*(a^2+b^2)^(1/2)-2*a
)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 399, normalized size of antiderivative = 1.10 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=-\frac {1}{2} \, \sqrt {-\frac {B^{2} a + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}} \log \left (\sqrt {b \tan \left (d x + c\right ) + a} B^{3} b + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{3} \sqrt {-\frac {B^{2} a + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}}\right ) + \frac {1}{2} \, \sqrt {-\frac {B^{2} a + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}} \log \left (\sqrt {b \tan \left (d x + c\right ) + a} B^{3} b - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{3} \sqrt {-\frac {B^{2} a + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}}\right ) + \frac {1}{2} \, \sqrt {-\frac {B^{2} a - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}} \log \left (\sqrt {b \tan \left (d x + c\right ) + a} B^{3} b + \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{3} \sqrt {-\frac {B^{2} a - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}}\right ) - \frac {1}{2} \, \sqrt {-\frac {B^{2} a - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}} \log \left (\sqrt {b \tan \left (d x + c\right ) + a} B^{3} b - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{3} \sqrt {-\frac {B^{2} a - \sqrt {-\frac {B^{4} b^{2}}{d^{4}}} d^{2}}{d^{2}}}\right ) \]

[In]

integrate((B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(-(B^2*a + sqrt(-B^4*b^2/d^4)*d^2)/d^2)*log(sqrt(b*tan(d*x + c) + a)*B^3*b + sqrt(-B^4*b^2/d^4)*d^3*s
qrt(-(B^2*a + sqrt(-B^4*b^2/d^4)*d^2)/d^2)) + 1/2*sqrt(-(B^2*a + sqrt(-B^4*b^2/d^4)*d^2)/d^2)*log(sqrt(b*tan(d
*x + c) + a)*B^3*b - sqrt(-B^4*b^2/d^4)*d^3*sqrt(-(B^2*a + sqrt(-B^4*b^2/d^4)*d^2)/d^2)) + 1/2*sqrt(-(B^2*a -
sqrt(-B^4*b^2/d^4)*d^2)/d^2)*log(sqrt(b*tan(d*x + c) + a)*B^3*b + sqrt(-B^4*b^2/d^4)*d^3*sqrt(-(B^2*a - sqrt(-
B^4*b^2/d^4)*d^2)/d^2)) - 1/2*sqrt(-(B^2*a - sqrt(-B^4*b^2/d^4)*d^2)/d^2)*log(sqrt(b*tan(d*x + c) + a)*B^3*b -
 sqrt(-B^4*b^2/d^4)*d^3*sqrt(-(B^2*a - sqrt(-B^4*b^2/d^4)*d^2)/d^2))

Sympy [F]

\[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=B \int \sqrt {a + b \tan {\left (c + d x \right )}}\, dx \]

[In]

integrate((B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))**(1/2),x)

[Out]

B*Integral(sqrt(a + b*tan(c + d*x)), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is

Giac [F(-1)]

Timed out. \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Timed out} \]

[In]

integrate((B*a+b*B*tan(d*x+c))/(a+b*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Timed out

Mupad [B] (verification not implemented)

Time = 9.98 (sec) , antiderivative size = 3033, normalized size of antiderivative = 8.38 \[ \int \frac {a B+b B \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Too large to display} \]

[In]

int((B*a + B*b*tan(c + d*x))/(a + b*tan(c + d*x))^(1/2),x)

[Out]

2*atanh((8*a*b^2*(a + b*tan(c + d*x))^(1/2)*(- (-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3
*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(-16*B^4*a^4*b^2*d^4)^(1/2))/((16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) +
(16*B^3*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^3*d^4*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) +
 (4*B*a*b^5*d^4*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*B^2*a^2*b^2*(a + b*tan(c + d*x))^(1/2)
*(- (-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2))/((16*
B^3*a^4*b^3*d^3)/(a^2*d^4 + b^2*d^4) + (4*B*a*b^3*d^2*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (32*
B^2*a^4*b^2*d^2*(a + b*tan(c + d*x))^(1/2)*(- (-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3*
d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2))/((16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*B^3*a^6*b^3*d^5)/(a^2*d^4
 + b^2*d^4) + (4*B*a^3*b^3*d^4*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^5*d^4*(-16*B^4*a^4*
b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*(- (-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3*d^2)/
(4*(a^2*d^4 + b^2*d^4)))^(1/2) - 2*atanh((8*a*b^2*((-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (B^2*a*b
^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*tan(c + d*x))^(1/2)*(-16*B^4*b^6*d^4)^(1/2))/((16*B^3*a^2*b^7*d^
5)/(a^2*d^4 + b^2*d^4) - 16*B^3*a^2*b^5*d - 16*B^3*b^7*d + (16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3
*b^3*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^5*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2
*d^5)) - (32*B^2*b^4*((-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (B^2*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4
)))^(1/2)*(a + b*tan(c + d*x))^(1/2))/((16*B^3*a^2*b^5*d^3)/(a^2*d^4 + b^2*d^4) - (16*B^3*b^5)/d + (4*B*a*b^3*
d^2*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (32*B^2*a^2*b^4*d^2*((-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4
+ b^2*d^4)) + (B^2*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*tan(c + d*x))^(1/2))/((16*B^3*a^2*b^7*d^5)
/(a^2*d^4 + b^2*d^4) - 16*B^3*a^2*b^5*d - 16*B^3*b^7*d + (16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b
^3*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^5*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d
^5)))*((-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) + (B^2*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2) - 2*a
tanh((32*B^2*a^2*b^2*(a + b*tan(c + d*x))^(1/2)*((-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a
^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2))/((16*B^3*a^4*b^3*d^3)/(a^2*d^4 + b^2*d^4) - (4*B*a*b^3*d^2*(-16*B^4*a^
4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^2*(a + b*tan(c + d*x))^(1/2)*((-16*B^4*a^4*b^2*d^4)^(1/2)/(16*
(a^2*d^4 + b^2*d^4)) - (B^2*a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(-16*B^4*a^4*b^2*d^4)^(1/2))/((16*B^3*a^4*
b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*B^3*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4) - (4*B*a^3*b^3*d^4*(-16*B^4*a^4*b^2*d^
4)^(1/2))/(a^2*d^5 + b^2*d^5) - (4*B*a*b^5*d^4*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*B^2*a^4
*b^2*d^2*(a + b*tan(c + d*x))^(1/2)*((-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3*d^2)/(4*(
a^2*d^4 + b^2*d^4)))^(1/2))/((16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*B^3*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^
4) - (4*B*a^3*b^3*d^4*(-16*B^4*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) - (4*B*a*b^5*d^4*(-16*B^4*a^4*b^2*d^4)^
(1/2))/(a^2*d^5 + b^2*d^5)))*((-16*B^4*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (B^2*a^3*d^2)/(4*(a^2*d^4
 + b^2*d^4)))^(1/2) - 2*atanh((32*B^2*b^4*((B^2*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B^4*b^6*d^4)^(1/2)/(
16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*tan(c + d*x))^(1/2))/((16*B^3*b^5)/d - (16*B^3*a^2*b^5*d^3)/(a^2*d^4 + b
^2*d^4) + (4*B*a*b^3*d^2*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^2*((B^2*a*b^2*d^2)/(4*(a^2*d^4
 + b^2*d^4)) - (-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*tan(c + d*x))^(1/2)*(-16*B^4*b^6
*d^4)^(1/2))/(16*B^3*b^7*d + 16*B^3*a^2*b^5*d - (16*B^3*a^2*b^7*d^5)/(a^2*d^4 + b^2*d^4) - (16*B^3*a^4*b^5*d^5
)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^3*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^5*d^4*(-16*B^
4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*B^2*a^2*b^4*d^2*((B^2*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B
^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*tan(c + d*x))^(1/2))/(16*B^3*b^7*d + 16*B^3*a^2*b^5*d
 - (16*B^3*a^2*b^7*d^5)/(a^2*d^4 + b^2*d^4) - (16*B^3*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (4*B*a^3*b^3*d^4*(-16
*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*B*a*b^5*d^4*(-16*B^4*b^6*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*((B^2
*a*b^2*d^2)/(4*(a^2*d^4 + b^2*d^4)) - (-16*B^4*b^6*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)))^(1/2)